﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Cataloger
{
    public static class GlowneListView
    {
        public static void NaglowkiKolumnKatalog(ListView listView1)
        {           
            listView1.BeginUpdate();
            listView1.View = View.Details;
            listView1.Clear();
            listView1.Columns.AddRange(new ColumnHeader[] 
            { 
                new ColHeader("Katalog", 0, HorizontalAlignment.Left),
                new ColHeader("Nośnik", 0, HorizontalAlignment.Left),
                new ColHeader("Nazwa", 100, HorizontalAlignment.Left),
                new ColHeader("Rozmiar", 100, HorizontalAlignment.Left),
                new ColHeader("DataUtw", 100, HorizontalAlignment.Left),
                new ColHeader("DataMod", 100, HorizontalAlignment.Left),
                new ColHeader("DataDost", 100, HorizontalAlignment.Left),
                new ColHeader("Rozszerzenie", 100, HorizontalAlignment.Left),
                new ColHeader("Atrybuty", 100, HorizontalAlignment.Left),
                new ColHeader("Kategoria", 100, HorizontalAlignment.Left),
                new ColHeader("Sciezka", 100, HorizontalAlignment.Left) 
            });

            listView1.EndUpdate();
        }

        public static void NaglowkiKolumnKategorie(ListView listView1)
        {
            NaglowkiKolumnKatalog(listView1);
            listView1.BeginUpdate();
            listView1.Columns[0].Width = 100;
            listView1.Columns[1].Width = 50;
            listView1.Columns[9].Width = 60;
            listView1.EndUpdate();
        }

        public static void NaglowkiKolumnKategorieStatyczne(ListView listView1)
        {
            NaglowkiKolumnKatalog(listView1);
            listView1.BeginUpdate();
            listView1.Columns[0].Width = 100;
            listView1.Columns[1].Width = 50;
            listView1.Columns[9].Width = 0;

            listView1.EndUpdate();
        }
     
    }
}
